package com.lwj.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @Date 2022/1/29 17:42
 * @Author lwj
 */
@Aspect
@Component
public class MyAspectJ {
    //@Before代表在执行方法之前执行增强代码
    @Before("execution(* com.lwj.service.impl.UserServiceImpl.*(..))")
    public void before1() {

        System.out.println("UserServiceImpl所有方法执行之前");
    }

}